﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

public class TestWindow : EditorWindow
{
    [SerializeField]
    string myString = "Hello World";

    [SerializeField]
    bool groupEnabled;

    [SerializeField]
    bool myBool = true;

    [SerializeField]
    float myFloat = 1.23f;


    //[MenuItem("Test/Window/TestWindow")]
    static void Init()
    {
        var wnd = (TestWindow) EditorWindow.GetWindow( typeof( TestWindow ) );
        wnd.Show();
    }


    void OnGUI ()
    {
        GUILayout.Label( "Base Settings", EditorStyles.boldLabel );
        myString = EditorGUILayout.TextField( "Text Field", myString );

        groupEnabled = EditorGUILayout.BeginToggleGroup( "Optional Settings", groupEnabled );
        myBool = EditorGUILayout.Toggle( "Toggle", myBool );
        myFloat = EditorGUILayout.Slider( "Slider", myFloat, -3, 3 );
        EditorGUILayout.EndToggleGroup();
    }
}
